package com.marion.ddd.entity;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;
import java.io.Serializable;


/**
 * 用户账户表(TAccount)实体类
 *
 * @author makejava
 * @since 2021-12-04 11:35:39
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Entity
@Table(name = "t_account")
@DynamicInsert
@DynamicUpdate
public class AccountEntity implements Serializable {
    private static final long serialVersionUID = -60454724033714670L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * 用户UID
     */
    private Long uid;
    /**
     * 姓名
     */
    private String name;
    /**
     * 银行卡号
     */
    private String accountNo;
    /**
     * 余额
     */
    private Long amount;

    /**
     * 扣款策略 0-不能为负，1-可为负数
     */
    private Integer overdraft;

    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 更新时间
     */
    private Date updatedAt;
}

